import Vue from 'vue'
import VueRouter from 'vue-router'
import Login from '@/views/login/index.vue'
import Layout from '@/views/layout/index.vue'
import User from '@/views/user/index.vue'
import Question from '@/views/question/index.vue'
import Viedeo from '@/views/viedeo/index.vue'
import Home from '@/views/home/index.vue'
Vue.use(VueRouter)
const routes = [
  {
    path: '/login',
    name: 'Login',
    component: Login
  },
  {
    path: '/',
    name: 'Layout',
    component: Layout,
    children: [
      {
        name: Home,
        path: '',
        component: Home
      },
      {
        path: '/user',
        name: User,
        component: User
      },
      {
        path: '/question',
        name: Question,
        component: Question
      },
      {
        path: '/video',
        name: Viedeo,
        component: Viedeo
      }
    ]

  }
]

const router = new VueRouter({
  routes
})

export default router
